﻿<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>商品编辑-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet">
<link href="${st.resDomain}/css/form-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC.css" rel="stylesheet">
</head>

<body>
<!--- header --->
<div id="header">
  <div class="main f_clear">
  	<div class="logo"><h2><@shiro.principal property="s_name" /></h2><span>您好！<@shiro.principal property="m_name" />， <a href="${st.domain}/member/logoutDo">退出</a>&nbsp;&nbsp;&nbsp;[ <a href="${st.shopDomain}/localSale/v1.1" target="_blank">进行线下销售</a> ]</span></div>
    <div class="f_right"><a href="${st.userDomain}">个人中心</a> <a href="${st.shopDomain}" class="selected">店铺管理</a><@shiro.hasRole name="FIRM"><a href="${st.firmDomain}">企业管理</a></@shiro.hasRole></div>
  </div>
</div>
<!--- header end--->
<!--topnav -->
<div id="topnav">
  <div class="main">
    <ul class="left">      
      
      <li><a href="${st.shopDomain}/order/list?statuses=0">订单</a></li>
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">商品</a></li>
      <li><a href="${st.shopDomain}/memberVip">会员</a></li>      
      <li><a href="${st.shopDomain}/store/edit">店铺</a></li>      
      <li><a href="${st.shopDomain}/goodsReport">数据</a></li>
    </ul>
  </div>
</div>
<!--topnav end-->
<div id="main" class="f_clear">
  <div id="left">
    <ul id="menu1">
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">店铺商品</a></li>
      <li><a href="${st.shopDomain}/store/onlineSetting">线上销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=0">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=0">满额促销</a></li>
      <li><a href="${st.shopDomain}/store/localSetting">线下销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=2">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=2">满额促销</a></li>
      
      <li style="margin-left:10px;"><a href="${st.shopDomain}/localSale/soft">离线版本</a></li>
      <li><a href="${st.shopDomain}/storeRestock/list?isChecked=0">进货管理</a></li>
      <li><a href="${st.shopDomain}/storeGoods/add">商品入库</a></li>
    </ul>
  </div>
  <div id="right">
    <div id="title">商品管理 - 商品编辑</div>
    <div id="spbj">
     <div id="hideData" style="display:none">${companyId}</div>
     <form id="sgForm">
      <div class="form val">
        <input name="storeGoodsId" type="hidden" value="${storeGoods.storeGoodsId}"/>
        <p>
          <label>商品编码：</label>
          <span>${storeGoods.barCode}</span>
        </p>
        <p>
          <label>商品原名：</label>
          <span>${storeGoods.name}</span>
        </p>
        <p>
          <label>标题：<em>*</em></label>
          <input name="title" type="text" value="${storeGoods.title}"/>
        </p>
        <p>
          <label>副标题：</label>
          <input name="subTitle" type="text" value="${storeGoods.subTitle}"/>
        </p>
        <p>
          <label>关键字：<em>*</em></label>
          <input name="keywords" type="text" value="${storeGoods.keywords}"/>
        </p>
        <p class="zs">
          多个关键字用空格隔开
        </p>
        <p class="xldx">
          <label>系统类目：<em>*</em></label>
          <span id="selectCats" style="float:none;display:inline-block;"></span>
          <input type="text" id="catId" name="category.catId" value="${storeGoods.category.catId}" style="width:0px;height:0px;padding:0px;border: 0px;">
          <input type="hidden" id="categoryPath" name="categoryPath" value="${storeGoods.categoryPath}">
        </p>
        <p class="xldx">
          <label>企业类目：</label>
          <span id="selectClassify" style="float:none;display:inline-block;"></span>
          <input type="hidden" id="classifyId" value="${storeGoods.goodsClassify.classifyId}">
        </p>
        <p class="f_clear">
          <label>上架状态：<em>*</em></label>
          <span class="dx">
           <#list status as status >
            <input type="radio" name="status" value="${status.value}"<#if status.value == storeGoods.status > checked</#if>><font>${status.text}</font>
           </#list>
          </span>
        </p>
        <p class="s">
          <label>成本：<em>*</em></label>
          <input name="selfCost" type="text" value="${storeGoods.selfCost}" maxlength="10"/> <span>￥/${storeGoods.unit}</span> <span id="selfCostMsg" style="display:inherit;"></span>
          <#if storeGoods.atDiscount>
          <label>售价：<em>*</em></label>
          <input name="originalPrice" type="text" value="${storeGoods.originalPrice}" maxlength="10"/> <span>￥/${storeGoods.unit}</span> <span id="originalPriceMsg" style="display:inherit;"></span>
          <label>促销价：</label>
          <span><a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${storeGoods.storeGoodsId}&type=DISCOUNT" style="text-decoration: underline;color:blue;">${storeGoods.price}</a>￥/${storeGoods.unit}</span>
          <#else>
          <label>售价：<em>*</em></label>
          <input name="price" type="text" value="${storeGoods.price}" maxlength="10"/> <span>￥/${storeGoods.unit}</span> <span id="priceMsg" style="display:inherit;"></span>
          </#if>
        </p>
        <p class="s">
          <label>计费单位：</label>
          <span>${storeGoods.unit}</span>
          <#if storeGoods.sellUnit??>
          <label>出售单位：</label>
          <span>${storeGoods.sellUnit}</span>
          <label>折算：</label>
          <input id="unitConvert" name="unitConvert" type="text" value="${storeGoods.unitConvert}" maxlength="10"/><span><i>${storeGoods.unit}</i>/<i>${storeGoods.sellUnit}</i></span><span id="unitConvertMsg" style="display:inherit;"></span>
          </#if>
        </p>
        <p class="zs">
          	以下参数以‘ <#if storeGoods.sellUnit??>${storeGoods.sellUnit}<#else>${storeGoods.unit}</#if> ’为单位
        </p>
        <p class="s">
          <label>底存：<em>*</em></label>
          <input name="stockEnd" type="text" value="${storeGoods.stockEnd}" maxlength="10"/><span id="stockEndMsg" style="display:inherit;"></span>
         <label>最小出售量：<em>*</em></label>
          <input name="sellMin" type="text" value="${storeGoods.sellMin}" maxlength="10"/><span id="sellMinMsg" style="display:inherit;"></span>
          <label>默认出售量：<em>*</em></label>
          <input name="sellDef" type="text" value="${storeGoods.sellDef}" maxlength="10"/><span id="sellDefMsg" style="display:inherit;"></span>
          <label>出售量幅度：<em>*</em></label>
          <input name="sellExt" type="text" value="${storeGoods.sellExt }" maxlength="10"/>
        </p>
        <p class="pic">
          <label>商品图片：</label>
          <span class="f_clear" id="picSpan">
           <input type="hidden" id="pic" name="pic" value="${storeGoods.pic}" />
           <#if storeGoods.pic??>
           <img id="img_pic" src="${st.resDomain}/images/goods_def.jpg" <#if storeGoods.pic??>data="${storeGoods.pic}"</#if> ><i>默认</i>
           </#if>
           <#list storeGoods.storeGoodsPics as pic >
            <input type="hidden" id="pic_${pic_index}" name="pics" value="${pic.pic}" />
            <img id="img_pic_${pic_index}" src="${st.resDomain}/images/goods_def.jpg" <#if pic.pic??>data="${pic.pic}"</#if> style="cursor: pointer;"><a id="picDel_${pic_index}" href="javascript:;" class="del"></a>
           </#list>
           <a href="javascript:;" id="bt_addPic" class="btn2">添加图片</a>
          </span>
          <span style="width:100%; padding-left:100px">还可以增加<span id="picCount" style="float:none;display:inline;padding:0px 3px;">${picAmount - storeGoods.storeGoodsPics?size}</span>张图片</span>
        </p>
        <p>
          <label>商品介绍：<em>*</em></label>
          <textarea name="description" cols="" rows="" style="width:600px">${storeGoods.description}</textarea>
        </p>
      </div>
      <div class="Submit f_clear">
       <input type="submit" id="submitBt_0" onclick="return false;" class="feignhide"><!-- 实现回车提交 -->
       <a href="javascript:;" id="submitBt_1" class="btn1"><i></i><em>保存</em></a></div>
     </form>
    </div>
  </div>
</div>
<div id="picItemTmp" style="display:none;">
<input type="hidden" id="pic_-{num}-" name="pics" value="-{url}-" />
<img id="img_pic_-{num}-" data="-{url}-" style="cursor: pointer;"><a id="picDel_-{num}-" class="del"></a>
</div>
<!--footer-->
<div id="footer">Copyright© 迈小众 <span style="padding-left:30px;">客服QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3101084438&site=qq&menu=yes" rel="nofollow"><img border="0" src="http://wpa.qq.com/pa?p=2:3101084438:50" alt="点击联系我们，QQ：3101084438" title="点击联系我们，QQ：3101084438"></a></span></div>
<!--footer end-->
<script data-main="${st.resDomain}/scripts/shop/storeGoods_edit" src="${st.resDomain}/scripts/require.js"></script>
</body>
</html>
